package com.cndongtai.service.torchn;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.cndongtai.dao.impl.TorchnAppUserInfoDao;
import com.cndongtai.po.TorchnAppUserInfo;

@Service("torchnAppLoginService")
public class TorchnAppLoginService {
	
	@Resource(name="torchnAppUserInfoDao")
	private TorchnAppUserInfoDao torchnAppUserInfoDao;
	
	public int addTorchnAppUserInfo(TorchnAppUserInfo userInfo) {
		return torchnAppUserInfoDao.addTorchnAppUserInfo(userInfo);
	}
	
	public int activedTorchnAppUser(String userName) {
		return torchnAppUserInfoDao.activedTorchnAppUser(userName);
	}
	
	public int modifyTorchnAppUserPassword(String userId, String password) {
		return torchnAppUserInfoDao.modifyTorchnAppUserPassword(userId,password);
	}
	
	
	public List<TorchnAppUserInfo> queryTorchnAppUserInfoList(TorchnAppUserInfo userInfo) {
		return torchnAppUserInfoDao.queryTorchnAppUserInfoList(userInfo);
	}
	
	public TorchnAppUserInfo queryTorchnAppUserInfoByEmail(String email) {
		return torchnAppUserInfoDao.queryTorchnAppUserInfoByEmail(email);
	}
	
	public TorchnAppUserInfo queryTorchnAppUserInfoById(Long userId) {
		return torchnAppUserInfoDao.queryTorchnAppUserInfoById(userId);
	}
	
	public int modifyNickname(TorchnAppUserInfo userInfo) {
		return torchnAppUserInfoDao.modifyNickname(userInfo);
	}
	
	public int modifyHeaderImage(TorchnAppUserInfo userInfo) {
		return torchnAppUserInfoDao.modifyHeaderImage(userInfo);
	}
	
	public String queryAgreement(Integer type) {
		return torchnAppUserInfoDao.queryAgreement(type);
	}
	
}
